package com.zhiyou.service.impl;

import com.zhiyou.dao.HouseDao;
import com.zhiyou.model.House;
import com.zhiyou.service.HouseService;

import java.util.HashMap;
import java.util.List;

public class HouseServiceImpl implements HouseService {
    private HouseDao hD=new HouseDao();
    @Override
    public int getHouseNum(HashMap<String,String> keyword) {
        return hD.getHouseNum(keyword);
    }

    @Override
    public List<House> getHouse(int pageNo, int pageSize,HashMap<String,String> keywordMap) {
        return hD.getHouse(pageNo,pageSize,keywordMap);
    }

    @Override
    public void deleteById(int hid) {
        hD.deleteById(hid);
    }

    @Override
    public House selectById(int hid) {
        return hD.selectById(hid);
    }

    @Override
    public void updateNew(int hid, String haddress, String hfloor, int hroomNum, String harea, String hdir, int hdeco, int hair, double hprice, int hrentStatus, String himage, String haddTime, String hupdateTime) {
        hD.updateNew(hid,haddress,hfloor,hroomNum,harea,hdir,hdeco,hair,hprice,hrentStatus,himage,haddTime,hupdateTime);
    }

    @Override
    public void addNew(String haddress, String hfloor, int hroomNum, String harea, String hdir, int hdeco, int hair, double hprice, int hrentStatus, String himage, String haddTime, String hupdateTime) {
        hD.addNew(haddress,hfloor,hroomNum,harea,hdir,hdeco,hair,hprice,hrentStatus,himage,haddTime,hupdateTime);
    }
}
